package com.tsll.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * 
 * @TableName verifyapplication
 */
public class VerifyApplication implements Serializable {
    /**
     * 校验申请编号
     */
    private Integer id;

    /**
     * 校验员工
     */
    private Integer verifystaffid;

    /**
     * 校验申请状态0是正在申请1是未通过申请
     */
    private Integer status;

    /**
     * 校验申请时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date verifydate;



    /**
     * 校验人员
     */
    private Staff staff;

    /**
     * 审核人员id
     */
    private Integer auditorId;

    /**
     * 审核人员
     */
    private Staff auditor;

    /**
     * 审核时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern ="yyyy-MM-dd", timezone = "GMT+8")
    private Date auditTime;

    /**
     * 驳回理由
     */
    private  String rejection;

    private static final long serialVersionUID = 1L;


    /**
     * 校验申请编号
     */
    public Integer getId() {
        return id;
    }

    /**
     * 校验申请编号
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * 校验员工
     */
    public Integer getVerifystaffid() {
        return verifystaffid;
    }

    /**
     * 校验员工
     */
    public void setVerifystaffid(Integer verifystaffid) {
        this.verifystaffid = verifystaffid;
    }

    /**
     * 校验申请状态0是正在申请1是未通过申请
     */
    public Integer getStatus() {
        return status;
    }

    /**
     * 校验申请状态0是正在申请1是未通过申请
     */
    public void setStatus(Integer status) {
        this.status = status;
    }

    /**
     * 校验申请时间
     */
    public Date getVerifydate() {
        return verifydate;
    }

    /**
     * 校验申请时间
     */
    public void setVerifydate(Date verifydate) {
        this.verifydate = verifydate;
    }

    public Staff getStaff() {
        return staff;
    }

    public void setStaff(Staff staff) {
        this.staff = staff;
    }

    public String getRejection() {
        return rejection;
    }

    public void setRejection(String rejection) {
        this.rejection = rejection;
    }

    public VerifyApplication() {
    }

    public VerifyApplication(Integer verifystaffid, Integer status, Date verifydate) {
        this.verifystaffid = verifystaffid;
        this.status = status;
        this.verifydate = verifydate;
    }

    public Integer getAuditorId() {
        return auditorId;
    }

    public void setAuditorId(Integer auditorId) {
        this.auditorId = auditorId;
    }

    public Staff getAuditor() {
        return auditor;
    }

    public void setAuditor(Staff auditor) {
        this.auditor = auditor;
    }

    public Date getAuditTime() {
        return auditTime;
    }

    public void setAuditTime(Date auditTime) {
        this.auditTime = auditTime;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        VerifyApplication other = (VerifyApplication) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getVerifystaffid() == null ? other.getVerifystaffid() == null : this.getVerifystaffid().equals(other.getVerifystaffid()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getVerifydate() == null ? other.getVerifydate() == null : this.getVerifydate().equals(other.getVerifydate()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getVerifystaffid() == null) ? 0 : getVerifystaffid().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getVerifydate() == null) ? 0 : getVerifydate().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", verifystaffid=").append(verifystaffid);
        sb.append(", status=").append(status);
        sb.append(", verifydate=").append(verifydate);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}